package com.yupi.oj.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.oj.model.dto.comment.CommentQueryRequest;
import com.yupi.oj.model.entity.Comment;
import com.yupi.oj.model.vo.CommentVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 兰飞宇
* @description 针对表【comment(评论)】的数据库操作Service
* @createDate 2024-12-14 16:07:21
*/
public interface CommentService extends IService<Comment> {
    /**
     * 校验
     *
     * @param comment
     * @param add
     */
    void validComment(Comment comment, boolean add);

     QueryWrapper<Comment> getQueryWrapper(CommentQueryRequest commentQueryRequest);
    /**
     * 分页获取帖子封装
     *
     * @param commentPage
     * @param request
     * @return
     */
    Page<CommentVO> getCommentVOPage(Page<Comment> commentPage, HttpServletRequest request);

    List<CommentVO> getByCommentIdList(Long  replyId,HttpServletRequest request);
}
